<?php

namespace Home\Model;

use Think\Model;

class DocumentLinkModel extends Model
{
    public function lists($category, $order = '`id` DESC', $status = 1, $field = true){
        $list = M()->table([C('DB_PREFIX').'document_link'=>'a', C('DB_PREFIX').'document'=>'b'])
            ->field('a.*,b.*')->where('a.id=b.id and b.category_id="'.$category.'"')->select();
        return $list;
    }
}
